﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;

namespace VehicleMaintenance.Models
{
    public class Customer
    {
        [Key]
        [Column("CustomerID")]
        public int CustomerID { get; set; }
        //[ForeignKey("TypeID")]
        [Display(Name = "客户类别")]
        [Required(ErrorMessage = "客户类别不能为空")]
        public int TypeID { get; set; }
        [Display(Name = "客户编码")]
		[Required(ErrorMessage = "客户编码必须填写")]
        public string Code { get; set; }
        [Display(Name = "客户姓名")]
        [Required(ErrorMessage = "客户姓名不能为空")]
        public string Name { get; set; }
        [Display(Name = "地址")]
        public string Address { get; set; }
        [Display(Name = "联系人")]
        public string Contact { get; set; }
        [Display(Name = "联系电话")]
        public string Mobile { get; set; }
        [Display(Name = "传真")]
        public string Fax { get; set; }
        [Display(Name = "邮政编码")]
        public string Postcode { get; set; }
        [Display(Name = "Email")]
        public string Email { get; set; }
        [Display(Name = "QQ")]
        public string QQ { get; set; }
        [Display(Name = "网址")]
        public string Website { get; set; }
        [Display(Name = "MSN")]
        public string Msn { get; set; }
        [Display(Name = "备注")]
        public string Remark { get; set; }

        public CustomerType CustomerType { get; set; }

		public List<CarInfo> CarInfo { get; set; }
    }
}
